function plt_er1(tsdat,stepdat,core,nsteps,titlestr)
%function plt_er1(tsdat,stepdat,core,nsteps,titlestr)
%
% modified from plt_erosionrate1.m - originally by Steve Suttles
% modified by Patrick Dickhudt Dec. 2010
% - removed evals
%
% Plot Erosion rate figure

  
figure

ax11=axes( 'Xcolor', 'k','Ycolor','b','Xaxislocation','bottom',...
        'Yaxislocation','left');
    
set(gca,'outerposition',[0.02 0.02 .93 .93])    
line(tsdat.etime,tsdat.E,'color','b','Parent',ax11,'linewidth',1.2);
set(gca,'yscale','log');
set(gca,'xlim',[0 max(tsdat.etime)])
ylabel('Erosion Rate, [kg ^. s^{-1} ^. m^{-2}]','color','b')
xlabel('time, [s]')
                        
ax12=axes('Position', get(ax11, 'Position'), 'Xaxislocation', 'top',...
   'color', 'none','Yaxislocation', 'right', 'Xcolor', 'k', 'Ycolor', 'r', 'linewidth',1);

line(tsdat.etime, tsdat.tau,'color','r','linewidth',1.3 ,...
    'Parent',ax12);
set(gca,'xlim',[0 max(tsdat.etime)])
set(gca,'xticklabel',[ ])
set(gca,'ylim',[0 0.7])
ylabel('{\tau}, [Pa]')
            
            
%set ylimits for E
set(ax11,'ylim',[1e-8 1e-3])
title(['core ' titlestr])
set(gcf,'name','Erosion Rate')

saveas(gcf,[core '_er'],'fig')
            
            
            
            